From: Jasper St. Pierre Date: Fri, 8 Feb 2013 21:05:28 +0000 (-0500) Subject: searchDisplay: Remove pendingClear X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4101 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=62e1c08dd69d95eb010cc6b8ee1fa08bba79a9c4;p=gnome-shell.git searchDisplay: Remove pendingClear It turns out that every time we call getResultsForDisplay is directly after a setResults, so pendingClear is always true. https://bugzilla.gnome.org/show_bug.cgi?id=693836 --- diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 469d9e959..ec8650c90 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -205,13 +205,10 @@ const ListSearchResults = new Lang.Class({ this._notDisplayedResult = []; this._terms = []; - this._pendingClear = false; }, getResultsForDisplay: function() { - let alreadyVisible = this._pendingClear ? 0 : this.getVisibleResultCount(); - let canDisplay = MAX_LIST_SEARCH_RESULTS_ROWS - alreadyVisible; - + let canDisplay = MAX_LIST_SEARCH_RESULTS_ROWS; let newResults = this._notDisplayedResult.splice(0, canDisplay); return newResults; }, @@ -228,7 +225,6 @@ const ListSearchResults = new Lang.Class({ // copy the lists this._notDisplayedResult = results.slice(0); this._terms = terms.slice(0); - this._pendingClear = true; }, _keyFocusIn: function(icon) { @@ -245,7 +241,6 @@ const ListSearchResults = new Lang.Class({ clear: function () { this._content.destroy_all_children(); - this._pendingClear = false; }, getFirstResult: function() { @@ -271,14 +266,10 @@ const GridSearchResults = new Lang.Class({ this._notDisplayedResult = []; this._terms = []; - this._pendingClear = false; }, getResultsForDisplay: function() { - let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount(); - let canDisplay = this._grid.childrenInRow(this.actor.width) * this._grid.getRowLimit() - - alreadyVisible; - + let canDisplay = this._grid.childrenInRow(this.actor.width) * this._grid.getRowLimit(); let newResults = this._notDisplayedResult.splice(0, canDisplay); return newResults; }, @@ -295,7 +286,6 @@ const GridSearchResults = new Lang.Class({ // copy the lists this._notDisplayedResult = results.slice(0); this._terms = terms.slice(0); - this._pendingClear = true; }, _keyFocusIn: function(icon) { @@ -312,7 +302,6 @@ const GridSearchResults = new Lang.Class({ clear: function () { this._grid.removeAll(); - this._pendingClear = false; }, getFirstResult: function() {